]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st/entry: Avoid crash in update_*_relation
authorJohannes Maibaum <jmaibaum@gmail.com>
Mon, 18 Aug 2025 20:26:10 +0000 (22:26 +0200)
committerJohannes Maibaum <jmaibaum@gmail.com>
Wed, 20 Aug 2025 04:47:12 +0000 (06:47 +0200)
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3839>
(cherry picked from commit 093a2d0c27b6da6db10946dfcf36c00bd4e94a88)

src/st/st-entry.c

index 83ce19040f9b8cb80d07d98bc013cd7b9a2bb605..fad92ae67112c0261c9621a6e9153869ccb78d45 100644 (file)
@@ -1646,6 +1646,9 @@ update_hint_relation (StEntry *entry)
   accessible = clutter_actor_get_accessible (priv->entry);
   entry_accessible = ST_ENTRY_ACCESSIBLE (atk_object_get_parent (accessible));
 
+  if (accessible == NULL || entry_accessible == NULL)
+    return;
+
   if (entry_accessible->current_hint != NULL)
     {
       atk_object_remove_relationship (accessible,
@@ -1684,6 +1687,9 @@ update_label_relation (StEntry *entry)
   accessible = clutter_actor_get_accessible (priv->entry);
   entry_accessible = ST_ENTRY_ACCESSIBLE (atk_object_get_parent (accessible));
 
+  if (accessible == NULL || entry_accessible == NULL)
+    return;
+
   if (entry_accessible->current_label != NULL)
     {
       atk_object_remove_relationship (accessible,